#!/bin/bash
# 快递号码
postid=300000000000
# 校验码
checkCode=1100
while [ true ]
do
        [ ! -e a.json ] && touch a.json
        cp a.json b.json
        curl "https://www.kuaidi100.com/query?type=shunfeng&postid=${postid}&temp=0.20100176560318106&phone=${checkCode}" -s > a.json
        [ ! -s b.json ] && {
            cat a.json > b.json
        }
        amd5=`cat a.json |md5sum`
        bmd5=`cat b.json |md5sum`
        if [ "$amd5" != "$bmd5" ]
        then
                echo "更新了"|mail -s "更新" justwkj@qq.com

        fi
        sleep 60
done
